package com.sven.sharedb.core.exception;


import com.sven.sharedb.core.constants.RestCodeConstants;

/**
 * @author sven.wang
 * @version 2022/4/26 17:57
 */
public class BaseException extends RuntimeException {

    /**
     * 默认状态码，服务器异常
     */
    private int status = RestCodeConstants.EX_BUSINESS_BASE_CODE;

    public BaseException() {
    }
    
    public BaseException(String message) {
        super(message);
    }

    public BaseException(String message, int status) {
        super(message);
        this.status = status;
    }


    public BaseException(String message, Throwable cause) {
        super(message, cause);
    }

    public BaseException(Throwable cause) {
        super(cause);
    }

    public BaseException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }


    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

}
